package com.cloudsea.yunhaianalysis.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;

@Data
@Schema(description = "通用报表查询的请求DTO")
public class ReportQueryDTO {

    @NotNull(message = "必须指定门店ID")
    @Schema(description = "要查询的门店ID", requiredMode = Schema.RequiredMode.REQUIRED, type = "string", example = "1960000000000000001")
    private Long storeId;

    @NotNull(message = "开始日期不能为空")
    @Schema(description = "查询周期的开始日期", example = "2024-10-01")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate startDate;

    @NotNull(message = "结束日期不能为空")
    @Schema(description = "查询周期的结束日期", example = "2024-10-31")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate endDate;

    @Schema(description = "排行数量，默认为10", example = "10")
    private Integer topN = 10;
}
